﻿namespace ZhiAo.BaseFramework.DBConnection
{
    using System;
    using System.Data;

    internal interface I_DB
    {
        void Close();
        void Commit(object oDBTransaction);
        object CreateParameter(string strName, object strValue, ParameterDirection pdType, int iSize);
        object CreateTransaction();
        void Execute(string strSql, object oTransaction);
        bool Execute(string strSQL, bool IsNeedTransaction, object UserTransaction, CommandType commandType, params object[] parameters);
        void ExecuteProcedure(string strProcedureName, object[] oParameters);
        DataReader GetDataReader(string SQL, bool IsNeedTransaction, object UserTransaction, CommandType commandType, params object[] parameters);
        DataSet GetDataSet(string SQL, string Alias, bool IsNeedTransaction, object UserTransaction, CommandType commandType, params object[] parameters);
        DataView GetDataView(string SQL, bool IsNeedTransaction, object UserTransaction, CommandType commandType, params object[] parameters);
        string GetFieldValue(string SQL, string FieldName, bool IsNeedTransaction, object UserTransaction, CommandType commandType, params object[] parameters);
        object GetParameterValue(object oParameter);
        void RollBack(object oDBTransaction);

        string Connection { get; set; }

        ConnectionType ConnType { get; set; }

        string ErrMessage { get; }
    }
}

